﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <DrawingBrush x:Key="SimpleBackground" TileMode="Tile" Stretch="Fill" ViewportUnits="Absolute" Viewport="0,0,90,90">
        <DrawingBrush.Drawing>
            <DrawingGroup>
                <DrawingGroup.Children>
                    <GeometryDrawing Brush="#FF545454" Geometry="F1 M 0.000325521,0.00889079L 20.0077,0.00889079L 40.0076,0.00889079L 79.9899,0.00889079L 79.9899,80.0043L 0.000325521,80.0043L 0.000325521,39.9985L 0.000325521,19.9985L 0.000325521,0.00889079 Z "/>
                    <GeometryDrawing Brush="#FFFFFFFF" Geometry="F1 M 0.000325521,19.9985L 19.9988,-2.03457e-005L 40.0077,-2.03457e-005L 0.00476177,40.0029L 0.000325521,19.9985 Z "/>
                    <GeometryDrawing Brush="#FFFFFFFF" Geometry="F1 M 60.0003,0.0140788L 79.9899,0.0140788L 0,80.004L 0,60.0141"/>
                    <GeometryDrawing Brush="#FFFFFFFF" Geometry="F1 M 20.0003,80.0043L 79.9899,20.0141L 79.9899,40.0141L 40.0003,80.0043L 20.0003,80.0043 Z "/>
                    <GeometryDrawing Brush="#FFFFFFFF" Geometry="F1 M 60.0003,80.0043L 79.9902,60.0144L 79.9902,80.0043"/>
                </DrawingGroup.Children>
            </DrawingGroup>
        </DrawingBrush.Drawing>


        <DrawingBrush.RelativeTransform>
            <TranslateTransform x:Name="TTransTop" X="0" />
        </DrawingBrush.RelativeTransform>

    </DrawingBrush>

    <Storyboard x:Key="stb1">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(DrawingBrush.RelativeTransform).(TranslateTransform.X)" 
										   Storyboard.Target="{StaticResource SimpleBackground}"
										   RepeatBehavior="Forever"
										    SpeedRatio="0.005">
            <SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="10" />
        </DoubleAnimationUsingKeyFrames>

    </Storyboard>

    <Style x:Key="WaitProgress" TargetType="{x:Type ProgressBar}">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ProgressBar}">
                    <Border BorderBrush="#B2B2B2"
								BorderThickness="1"
								x:Name="MainBorder">

                        <Grid x:Name="Background" SnapsToDevicePixels="true">

                            <Border VerticalAlignment="Stretch"
										HorizontalAlignment="Stretch"
										x:Name="Top"
										Background="{StaticResource SimpleBackground}"
										SnapsToDevicePixels="False">
                            </Border>
                        </Grid>
                    </Border>

                    <ControlTemplate.Triggers>

                        <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Top">
                            <BeginStoryboard Storyboard="{StaticResource stb1}" />
                        </EventTrigger>

                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>